import request from '@/utils/request'

// 查询出入库单据列表
export function listStockBill(query) {
  return request({
    url: '/team/stockBill/list',
    method: 'get',
    params: query
  })
}

// 查询出入库单据详细
export function getStockBill(id) {
  return request({
    url: '/team/stockBill/' + id,
    method: 'get'
  })
}

export function getGoodListByStoreId(storeId) {
  return request({
    url: '/team/stockBill/store/' + storeId,
    method: 'get'
  })
}

// 新增出入库单据
export function addStockBill(data) {
  return request({
    url: '/team/stockBill',
    method: 'post',
    data: data
  })
}
// 出库单据
export function deleteStockBill(data) {
  return request({
    url: '/team/stockBill/delete',
    method: 'post',
    data: data
  })
}


// // 修改出入库单据
// export function updateStockBill(data) {
//   return request({
//     url: '/team/stockBill',
//     method: 'put',
//     data: data
//   })
// }

// 删除出入库单据
export function delStockBill(id) {
  return request({
    url: '/team/stockBill/' + id,
    method: 'delete'
  })
}
